import request from '@/router/axios';

//下载产品模板
export const downProduct = () => request({
  url: '/api/blade-product/product/download',
  responseType: 'blob',
  method: 'get'
})
//导入产品模板
export const importProduct = (data) => request({
  url: '/api/blade-product/tProduct/import',
  method: 'post',
  headers: { 'Content-Type': 'multipart/form-data' },
  data
})
//下载规格模板
export const downSpec = () => request({
  url: '/api/blade-product/tProduct/spec/download',
  responseType: 'blob',
  method: 'get'
})
//导入规格模板
export const importSpec = (data) => request({
  url: '/api/blade-product/product/import',
  method: 'post',
  headers: { 'Content-Type': 'multipart/form-data' },
  data
})
//下载文件模板
export const downFile = () => request({
  url: '/api/blade-product/tProduct/file/download',
  responseType: 'blob',
  method: 'get'
})

//导入文件模板
export const importFile = (data) => request({
  url: '/api/blade-product/tProduct/archive',
  method: 'post',
  headers: { 'Content-Type': 'multipart/form-data' },
  data
})
//3.2 - 导入记录
export const recordList = (data) => request({
  url: '/api/blade-product/productImport/page',
  method: 'get',
  params:data
})
export const recordDetail = (data) => request({
  url: '/api/blade-product/productImportDetails/page',
  method: 'get',
  params:data
})

